Fix loadFiles to allow multiple periods in file names.

This give slightly better file handling to loadFiles.

The existing code won't load files named with multiple "." properly. Something like "stuff.here.js" ends up with prop = "stuff". This will at least make it prop = "stuff.here"