Save build cache data only on successful build

If getBuildResult fails, getBuildResults was still saving
source files timestamps. So, if malformed source file was
not changed before next build, getBuildResult won't be called
second time and build error will not be reproduced.
Merge pull request #538 from bem/fix/save-cache

Save build cache data only on successful build