Only set 'folder' if cd didn't succeed