Merge of #288

Merge of https://github.com/zaggino/brackets-git/pull/288 and refactoring to separate Git-FTP code from the main code.

Please review my commits @FezVrasta
If I have broken something or you doesn't understand something, let me know.