Fix the issue with multiple rules

Factor out the get method, so that the flow of execution is as follows:
1. Get the hosts lines
2. Apply all rules
3. Write the lines back to file
Merge pull request #3 from NameFILIP/issue-1

Fix the issue with multiple rules