Fix NumberFormatException in PersistentBinaryDeque.

Don't assume that the files will have the same nonce, break the filenames apart
before checking on the components of the filename.
(cherry picked from commit 28b0fa4df79316f985a194ba45a7b301588758f4)
ENG-4432: Fix extension check in PersistentBinaryDeque.
(cherry picked from commit 32266b492e871e1345123a09e2d741a1aa66b96e)