Allow modules loaded via require() to use script-relative paths

--HG--
extra : rebase_source : 65db61516c356af13d28a26eaae7ffa8cd5bf0ae