add writing direction option when reflowing

This probably will fix #195.