Fix for potential termination where all tasks are popped between the
call to ->hasTasks() and ->popTask().
Trying to figure out why TravisCI doesn't allow writing to /tmp