Fixes minor bugs with mkdir, returned status code and adds a .gitattributes file