Fix syntax error (if statement).
Move rundir creation into init script.