use sys.getfilesystemencoding() to join paths if needed

This allows to serve an application from a path containing non-ascii characters (see https://github.com/mitsuhiko/flask/issues/149 ).