Correct basis set for writeInputFile

The method was supposed to include the basis set if
there was one, but it actually wouldn't include one
if it was there (and try to include on when there
wasn't). This commit corrects that.