Fixes BUILDINSOURCE detection

Fixes #736.

Paths are not regexps.

(low priority)