Fix a bug which cause Service's MD5 is not right

This issue because the comments and extra space should not be calculated in MD5, so this change is remove such things when generate "ServiceDefinition".
Change line 66 to make the definition not directly copy from lines.
In the for loop, format each line first then copy to def.
Merge pull request #8 from mikefoxnobel/patch-5

ServiceDefinitions should not have comments and blank lines. This made their MD5s incorrect.