Some minor fixed for RTL feature, mainly gruntfile and obsolete preg_replace.