Remove the tmpdir from the filename stored in the DB