SERVER-10034 Invalid --pidfilepath no longer silently ignored

Added logic to detect when the pid fails to be written and error accordingly.