Don't use the non-portable -D flag to install

To make it work with BSD install(1) in addition to GNU install(1),
make sure to use "install -d && install" rather than install -D.
Allow setting $PYTHON instead of using python3/2

Trying to use for instance /usr/bin/python2.6 doesn't work,
if the install script always prefers /usr/local/bin/python3.
Allow installing to /usr/local, as well as to /usr
Allow using $DESTDIR, for instance when packaging
Backport subprocess.check_output to python2.6
Merge branch 'anders/packaging'