BUG: get CLI module logic temp dir from application

Resetting the temporary directory at the application settings level
wasn't propagated to the CLI module logic. This change has the CLI
module logic getting the temporary directory from the application
as necessary.

Issue #3587



git-svn-id: http://svn.slicer.org/Slicer4/trunk@22903 3bd1e089-480b-0410-8dfb-8563597acbee