issue 524: respect maximum rlimits

For some reason I can't turn #524 into a PR using the API.