LocationTest: remove URL platform dependence

On Windows the file prefix for URLs is "file:/" and not "file://".

Also, directly creating a new URL from such a string results in a
malformed URL on Windows. Safer to use "new File().toURI().toURL()".
LocationTest: Ensure hidden files are hidden

Adding a "." prefix to file name is not sufficient to hide a file on
Windows. Needed to use Runtime.exec("attrib +h").
Location: ensure empty file lists aren't returned

If the list() method creates a length 0 string array, return null
instead of the empty arrray (as downstream code makes null checks).