Fix test failures on Fedora

There, /bin/ls and /usr/bin/ls are hardlinked. Python's realpath
returns the latter. Obvious fix is to only compare realpaths, never
realpath with what you think the path is.