Compact mass flow controller for harsh environments