Add --allowerasing flag option (RhBug:963137)
Work around a bug in NamedTemporaryFile(). (RhBug:1036116)