made importScripts less coding convention dependent

importScripts regex would end up in an infinite loop if it had a space in it.
I made the regex more tolerant of style and filename and made the script-string trimming slightly cleaner.
I haven't tested it to be completely foolproof but it should work with most conventions.