Move some functionality from publish() to PluginStep.process_lifecycle()

The functionality that was in publish() is generally useful and should live in
PluginStep.
get_working_dir looks in this order for a working dir:

 * self.working_dir
 * self.repo's working dir
 * the parent step's repo's working dir

If those fall through, a TypeError exception is thrown and the tasks are left in NOT_STARTED state.

This is the desired behavior but can be tricky to figure out what's going on. I'll add a logging statement and a better exception.