Ultrafast structural dynamics in layered transition metal dichalcogenides