changed the tmp directory code to check for a forward slash and append the dir name.