Correctly remove path of deleted db file from the queue.

Fixes #1833.
Add missing semicolons.
Remove unused code.

This code only migrated one of the 1.13 betas to the final layout.

Fixes #1853