Attempt to make ListDirectory serializable, even if the Factory is not itself.