bin/compile: Better automatic tarball creation

We currently create the tarball automatically if the root directory
has configure.ac (autoconf) or setup.py (distutils). Also fall back to
tar'ing up the source directory if the spec file has a source with a
.tar.gz extension.
bin/compile: Fix parsing of sources list