python tool: fixed wrong framework path in some cases on osx