Fix mozilla/thimble.mozilla.org#1564 - Check for existing file with name before creating a new file (#566)
Fix mozilla/thimble.mozilla.org#1564 - Check for existing file with name before creating a new file (#566)

* Fix mozilla/thimble.mozilla.org#1564 - Check for existing file with name before creating a new file

* Review Fix: Parentheses around ++ operator

sgupta7857/brackets,dangkhue27/brackets,humphd/brackets,simon66/brackets,Rajat-dhyani/brackets,raygervais/brackets,humphd/brackets,sgupta7857/brackets,Th30/brackets,simon66/brackets,mozilla/brackets,raygervais/brackets,simon66/brackets,Rajat-dhyani/brackets,raygervais/brackets,sgupta7857/brackets,simon66/brackets,Th30/brackets,Rajat-dhyani/brackets,Th30/brackets,Th30/brackets,dangkhue27/brackets,dangkhue27/brackets,sgupta7857/brackets,sgupta7857/brackets,humphd/brackets,nucliweb/brackets,dangkhue27/brackets,mozilla/brackets,raygervais/brackets,Rajat-dhyani/brackets,Rajat-dhyani/brackets,dangkhue27/brackets,humphd/brackets,mozilla/brackets,nucliweb/brackets,raygervais/brackets,nucliweb/brackets,mozilla/brackets,humphd/brackets,nucliweb/brackets,mozilla/brackets,nucliweb/brackets,simon66/brackets,Th30/brackets