Better way to determine script dir