allow either paths or file objects for configuration, added tests