Cleanup and tests added

Used a three state variable to indicate the task status. Should be one
of UNSTARTED/RUNNING/DONE currently encoded as strings. Maybe a declared
constant variable s preferred, but I'm unsure where to put it
(we need access in both task.js and file_task.js)