Numerous fixes, A security fix, a memory leak, and standardizing file paths

Fixed CERT MEM04-C; CWE-131,
 Fixed a memory leak in core,
Created a standard .tox folder based on OS, it stores the data file and DHTservers,
Ran it through astyle,
And fixed some minor bugs.