Added some commands

Fixed a security issue where apostrophes in the context of a URL weren't
removed.
Implemented a reasonably reliable method for only allowing one thread at
a time to use the SQL connector.
Name of the log file is now retrieved from the application's settings.