sh is sufficient here
Make build more customizable, add compatibility with BSD make
Fix segfault when XDG_CONFIG_HOME env is not defined

Also fix environment corruption by strcat'ing to string returned by getenv