add get_causes
make tests more robust
Merge pull request #286 from jduan/master

Add build.get_causes