Moved the size-parsing code for --max-size into its own function.