Moved common functionality from saveDX/VTK into private method. May be used for future save* methods.