Add a test for dep extraction.

Also be very slightly more efficient on pdb read.