Use .isfile instead of the generic .exists
Add unit tests for build checks