Make things work on osx

o Portable find command
o minor other fixes