Added .gitignore file.
Fixed hang on Windows XP machines caused by not checking the error code from ReadFile.