Create temporary directory if it does not exist
Merge branch 'staging'

Closes #3315.  Thanks Guillermo!