- Go to ~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books/
- Locate the folder for the book (the name will have been changed to a randomized string)
- Compress the folder into a .zip
- Change the .zip extension to .epub
And you thought iTunes was bad.