Fixed proc cr_create_content_file_from_string

Because of an earlier copy/paste mistake:
* variable $dir was not set (replaced with cr_fs_path)
* rearranged blocks, so that $content_file is already set