Fixed issues with the build_books.sh script when publican failed