Build on FreeBSD, and hopefully others.

Falling back to /tmp with a preprocessor warning for the edit command, and using the appropriate /proc paths for Free/Net/DragonFlyBSD for same executable detection.

Tested on FreeBSD 10.1 and Debian 7.7.