Fixes #850

Adds missing return statement when remote closes connection.
Adds gitignore for files generated by compilation