Obstructions to extending diffeomorphisms