Move Get-ScriptDirectory function inline with build script (so module imports are also correct)