Dynamic Path Handling

Changed path handling to support execution on multiple platforms, without having to use different code.