Added validation of base and target input directories.