Changed the way I check for local path before script runs.