A semi-Lagrangian method on dynamically adapted octree meshes