Add unit tests for encodeFilePath.