fix out of bounds exception for files that have been deleted

should fix http://p.nnev.de/4059