Start moving paths handling away from main.c

This cleans up paths handling from main.c to a globally available location
in global_paths.c.
Merge pull request #176 from omf2097/new-paths-handling

Start moving paths handling away from main.c