Fix bug in filename encoding, when using preprocessor