remove unused import
fix arguments to os.popen when checking for symlinks