(vfs_setup_cwd): move directory test to separate function.