Disk size spec may overflow max integer
Brian, the max positive integer size is 2^31, which will overflow into a negative number once you specify a disk size of >2048 MB. I would suggest doing the check at the bottom of validate_base_dir() using KB rather than bytes.