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