test coverity
added pushd
fixed some coverity scan issues
fix more coverity defects
more coverity scan fixes
fixed append to register
fixed more coverity scan defects