Fixed .foo extensions to work when get arguments provided

It was fixed 2 years ago in the pull request #94 (https://github.com/philsturgeon/codeigniter-restserver/pull/94)

There was an error in the function _detect_output_format()

With api/example/user/id/1.json URL's, enter in the first condition, but leaves without cleaning the arguments, which is done in the second condition.

Now, only enter in the first condition if the URL does not have arguments.