improve DBConnection::reset to allow spaces in filenames and directories

I noticed that the database reset wouldn't work with spaces in filenames or directories. This patch should fix that.