Fixed bug in leg/split processing, added build-install-local script