refactor shell_exec
streamline and document
updated todo
document and simplify temp file functions
temp dir/temp file return codes