make inputdir (sys.inputdir)  and masterdir (sys.masterdir)  configurable

via configure options. Solve issue #3688