Ensure to leave directory.