Some bugfixes in tax_assign and incorporation of the TMP_DIR variable