assuming its python
turning back on the instructions
returning error if scritpname is invalid and a tiny bit of sanitizing of the script name to avoid moving around in directories