fixing build and bundle to use the vardir option