properly resolve master script path