Cap max memory for Java with -Xmx; fix fs regexes