createResourceYaml to return nodes dict, write to yaml

1. Updated createResourceYaml to return the nodes dict rather than return 0 on success.
    This dict will be used to configure fab itself (to define role defs).
2. made yaml file write conditional - only write to file if file_path is set.
3. Made append to yaml file parameterized.
Merge pull request #22 from hkumarmk/fab_set_yaml

change fab function to return the nodes dict, write to yaml if required