On OSX Yosemite version 10.10. The system is called "Darwin" not "darwin"

I lower the platform.system() call by replacing by platform.system().lower()