Minor changes to generator needed for C# generator
Minor changes to generator needed for C# generator

Summary:
Support creating directories when necessary in output_to_relative_path
Set encoding to utf-8, this helps when emitting files with BOM at the
start

Test Plan: works for me

Reviewed By: kelkabany

posita/stone,posita/stone,posita/stone