Remove hardcoded paths

* added helper functions to return variables for system we are running on
* removed hardcoded paths and socket type

This will allow us to expand to other operating systems without changing too many files. 
On windows, the socket file is actually text for now, containing the port bound to localhost for this particular instance. It is not ideal, but unfortunately, go lacks support for named pipes in windows, and unix sockets is not an option. The implementation can of course change over time (we may add named pipes support, which is faster then TCP sockets). This approach has been chosen to have the least impact on current codebase.