resolves #1223: fix interaction with symbolic links

- symbolic links are followed if they are not broken
- move `lookupFiles()` into `utils` module
- add some tests for the symbolic link stuff
- build