Make bash completion script compatible with bash v3

Previus version was written for bash v4 and was causing syntax error
when used with older versions of bash that still ship with most systems.

References 3565094d300283b79bebfec76267aebd07d84621
Closes #359
Merge branch 'completion-fix'