Bug #678: Startup should create dir for pid file if it does not exists

(cherry picked from commit e0c813b59138aea45d44739d00abda7a9dc83abe)