async function writeProject( directory, data ) {
  if ( !directory ) {
    return;
  }
  const filePath = join( directory, PROJECT_FILE_NAME );
  if ( !data.name ) {
    log.warn( `Renderer process: io.writeProject: empty name in ${ JSON.stringify( data ) } in ${ directory }` );
    return;
  }
  try {
    await writeFile( filePath, JSON.stringify( data, null, "  " ), "utf8" );
  } catch ( e ) {
    log.warn( `Renderer process: io.writeProject: ${ e }` );
    throw new IoError( `Project file ${filePath} cannot be written.
          Please make sure that you have write permission for it` );
  }
}
Write project file to given directory
@param {String} directory
@param {Object} data