Better error checking, bug fix.

More error checking for wiki api, more debug output from diff, fix
diff bug where files were incorrectly marked as new.