fix unexpected cast for integer. refs #1696
support windows "\" directory separator. refs #1691