Trivial fixes to make clang happy (Apple XCode 4.5.2)

Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)

As such, with this little commit it now compiles cleanly on Mac OS X.

It does not function though due to at least some differences in 'dd' flags which the 'unpack' script generates
Add working OSX support (dd behaves differently there, but the original method is faster on Linux as dd supports fullblocks)

Also add CFLAGS for lots of corner-case compiler warnings and fix those warnings
Merge pull request #1 from massar/master

Merge 'Mac OSX support' from massar/master