Resolve script deployment directory in runtime