Fix 20130918: Merge upstream fixes and add the .gitignore file

SSIA.