inputfile != inputFile and re doesn't have replace method.

I really don't understand how this code could ever work. Or more likely
somebody made some large scale refactoring and didn't test enough.