Fix metadata backup not being written if book directory does not exist