os.realpath should be even better, taking into accounts symlinks