Mkwrapper fix3

fixes unrenamed variables from the last commit
adds argument parsing to mkwrapper