Use command line options instead of environment variables.

Implement debugging and installation directory options based
upon command line options instead of environment variables.

Used bash's builtin 'getopts' for options parsing and validation.