Fix flags so that they work for mac and non-mac.
Merge pull request #28 from ahmedcharles/flags

Fix flags so that they work for mac and non-mac.
Move platform selection logic to it's own script.