Fixed script directory problems - script now runs in its own location