Reinstate pmpost on Windows builds. Refactored the file locking code to have platform-dependent sections in a separate function.
Reinstate pmpost on Windows builds. Refactored the file locking
code to have platform-dependent sections in a separate function.