Fixed issue with converting QString to TCHAR*

Resubmitted by request as PR to develop branch instead of master (See comments on #14).

Possibly related to encoding - was getting corrupt chars when using (TCHAR*)QString::utf16() - switched to use toWCharArray() and added a null terminator (which is not added by toWCharArray()).