Accomplishes environment rewrite with a single curl by using a temporary file

Uses a temporary file called TFILE based on the PID of the bash script which is stored in $$.

Removes the temporary file after it is done.
Merge pull request #2 from jeremy--adams/patch-1

Accomplishes environment rewrite with a single curl by using a temporary...