Fix saving color maps when directory does not exists. [#735008]