Revised function get_realpath.  Also changed environment: introduced no_symlinks.