fix module imports in result code

symbols imported in the result file weren't found in on-the-fly mode, using run_path instead of exec(open().read()) fixes the issue.