Fix bad check for adding scriptPath to sys.path

Code currently checks to see if scriptPath is valid 3 times, then aborts. The call to add scritpPath
takes place after the last check aborts, but without any additional verification, meaning if the third
attempt to find scriptPath is bad, that bad path will still get added to sys.path. This fixes that