Make writes_cost work on Mac. Also add a .gitignore file.