Attempt to fix some errors with media syncing and os.chdir().