Binmode and Template line endings

This PR:

1-) Removes the binmode properties from file resources and remote_directory. 
2-) Makes sure that windows line endings are preserved during template rendering.
3-) render_template method is refactored out of Mixin into Mixin::TemplateContext so that we have a single place for template rendering logic. 

Tested on MacOS and Windows.