Fixes(Thanks Wriley)

- Case fixes(Stupid windows making my tables lowercase)
- Multiple checks to see if query worked or directory is writeable