This re-implements pull#714, using system() (which does work on Windows) and boost::thread().
Help text is: -blocknotify=<cmd> Execute command when the best block changes (%s in cmd is replaced by block hash)
Example usage (this is how I tested):
./bitcoind -blocknotify="./bitcoind getblock %s >> /tmp/blocks.txt"