Fixed memoization for remove read number.

In the edge case where it was a memoized file the read numbers on
the end, it returned the wrong filename.