Undo in File does not work.
There is no "Undo" in "File". Have you tried "Undo" in the "Edit" menu? For me this works, but only, if the "Rebuild Book..." was the very last command.
If you missed that moment, your only option would be to restore your Aperture library from your most recent backup, if that includes the current version of your book.