Provide resources helpers
Close a URL connection.
This works around a JDK bug where if the URL connection is to a JAR file, and the entry is a directory, an NPE is
Tries to work out whether the given URL connection is a directory or not.
Depends on the URL connection type whether it's accurate. If it's unable to determine whether it's a directory,
this returns false.