Fix latest build-info modification

The creation of build-info.h should have been made in build
directory and not in source directory. This should fix changes
introduced in #738.