Customizable Tube Cap with Holes

This is a customizable tube cap. The defaults are for a standard toilet paper tube.
This is my first attempt at scad code, so I'd be thankful for any suggestions anyone might have.
NOTE: It seems that this doesn't customize very well -- it ends up not being round. If you know what the problem is, please comment and I'll try to fix it.