rewrote a branch in two methods to increase readability

To increase the readability of the script I changed a branch in the
methods check_deleted_files and find_affected_books.

Change-Id: I73a4a2398ea8b69f37ca0a94a35b5dfe613a0ec4
Merge "rewrote a branch in two methods to increase readability"