Update chuck_util_functions.py

slight reshuffle of nested functions and modified how the gist uses os.walk, may be a good idea to use this method for the archiver too. and if so.. then this allows me to entertain the idea of unifying the duplicated code. It will get on my nerves and i will refactor.