Added apppath constant to fix file issues.

Added apppath constant to fix file issues, noticed that when the client is run not in the same directory as the configuration script and ipaddress cache file that the script fail. The new changes gets the python scripts directory and then makes the client work correctly when being executed outside of the client directory.