Adding script options and fixed error in tempdir ctxmgr