Support building of system image in binary builds

I'm going to wait for travis to turn green before I merge
As @nalimilan mentioned in #9436, maybe some equivalent to Python's `samefile` is in order.