Use ::fromLocalFile instead of ::fromUserInput.

Fixes URL generation for path's like foo.js, which should be a relative path.