Make things work on osx

o Portable find command
o minor other fixes
o array expansion working on bash 3
Merge pull request #4 from hamnis/osx

Make things work on osx