Fix cli incompatibility with Windows

When checking for the last slash, use DIRECTORY_SEPARATOR to make the script work correctly when executed under Windows.

PS: can be applied to earlier versions
Add _endt to WidgetBase.php to solve a bug in datetime form widget.
New method WidgetBase::endOfTag() for jForm widgets

Refs #169
Merge pull request #167 from kissifrot/patch-1

Fix cli incompatibility with Windows