Allow running masters headless script from a different directory