Refactor complete get_status method in lwr.managers.stateful...

into more managable pieces.
Refactor big job directory function to reduce cyclomatic complexity.
Style fixes for flak8.