Adjust resource urls when file is included

Change the resource urls in included files when the included file is not
in the same directory as the importing file