Don't assume everyone uses your symlink structure.
os.chdir(os.path.join(os.path.dirname(__file__), 'stem'))
stem_version = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
os.chdir('../../')
You should navigate down to stem and then navigate out of it using os.path.dirname(file).
Also you should double check that the stem version is different from depictor, to make sure you captured it correctly.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information