Fixed bug and resource leaks

Parsing the palette file we checked if the input was null instead
of the line we just read.

In Con2PNG on error conditions we never closed the input file, which
Eclipse marked as resource leaks. This has been fixed.

Also removed unnecessary imports.