Fix utils.getOrigin for file:// urls