more robust script location