Fix errors in proprietary files extraction script

Change-Id: I424fa62f0cfa0c39cf9b980cf73f70ee6b58517e