Fix path handling for virtualenvs

On some systems under virtualenv the paths being checked were
symlinks, or under a symlink. Compute the real path to the file
where the modules live and use that path for testing whether
or not to include something in the output.