Add OSX support

I added OSX support.
fprintf parameter is not in BSD find command. The shortcut is to install the gnu find with package installer.

`brew install findutils``