Make classpath file opening more robust against non-jar files.

After report of exception in #177