Added tests for detect and propagate file changes on rebuild

Adds tests for #2465
Can you initialize this to `null` in the prototype?  Also, maybe we should underscore it to indicate it is a private thing...