Fixed segfault and added support for single quotes in toxic

Observed segmentation fault if only left double quotes is present in command string in toxic. Fixed this by adding check on index variable. Also added support for single quotes.