Add MacOSX and Android support; Limit purge/purgetest pattern to purge.minlen (default 5 chars)