Added a configure script

- Also added a bash-completion script for the configure script.