avoid os.path.realpath issues on RHEL 5

This fixes issue #10 by avoiding realpath()
and using the lower level readlink().
This is fine as the target is canonicalized already.

Also adjust for the different failures of readlink
and realpath and improve the caller so that only
particular errors are caught.