Added support for resource usage logging on Windows by creating an emulation of the os.wait4 function for Windows.