Fix retrieval of test resources for paths containing spaces
The use of URL.getPath() can be problematic when the repository path
contains spaces since they get encoded as %20, which will lead to a "No
such file" error when resolving to a local file. The fix first tries to
convert the resource URL to a URI (added in Java 1.5), which is then
used to construct the File instance. As a fallback use the old behavior
if a URISyntaxException is thrown.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>