Refactored and fixed bug in FilePreProcessor. Fixes #98