PID file now written prior to Minion init

This pull request fixes #4251 by ensuring the PID file is written prior to Minion init.

This ensures that the PID file is written before any chance of the Minion init section entering the resolve_dns method and looping (minion.py) while the master is unavailable.