WebTiles: change scan_titles to not modify global state so we can use it in check_config
WebTiles: Add support for -dir