split out key parsing from main in join.py to reduce complexity of main and eliminate linter warning.
split out key parsing from main in join.py to reduce complexity of main and eliminate linter warning.

pjuren/pyokit