Add getfilename helper function; adapted checkInputs() to 2.0.

NOTE: checkInputs() is currently broken as I don't have time for
      further debugging right now. I assume it's broken due to
      changes to the upload form by jQueryfying addUploadField().
Merge branch '2.0' of github.com:s9y/Serendipity into 2.0