code: function exists(path, type) {
  	try {
  		switch (type){
  			case "d": return FS.statSync(path).isDirectory();
  			default:  return FS.statSync(path).isFile();
  		}
  	}
  	catch (err) {
  		return false;
  	}
  }
docs: /*
  exists <path> [type]
  
  returns true if the path exists and is of the given type.