White spaces between C variables, parentheses or operators are not limited. In hex files are white spaces not allowed. You can open hex file in text editor and and see if there is white spaces inside strings (do not save the hex file from text editor, it may corrupt the file).What about spaces in the C program itself--could that be an issue that could effect the hex output when building.
This is very strange behavior and points probably to inconsistent connecitions between the PIC, programmer and/or computer USB port. Check the power settings for PicKit, if you use external power for the PIC then you cannot feed power fron PicKit.I tried both the PIC16f627a and PIC16f628a, I mean, once in a while-maybe two times they were programmed successfully.
If you want, i can upload whole project folder i created on my Linux machine with MPLAB X 6.20. You must unzip it to your MPLAB X projects folder.

