Limit concurrent file operations

Limit the number of concurrent photo lookups and moves to 10 in order to prevent hitting the open file limit.

I tried to leave all the existing logic as intact as possible, I only changed callback handling (and made callbacks required).