Respect rebuild option

I found that the rebuild option did not do anything. This is just to actually use it.
@gwwfps It makes a good point.