Better Temp and String handling

Provide better temp directory creation via mktemp and use bash test for zero length string test