Implement some common file operations on Windows.