assume that we added python and dot bin files to the search path.
added error displaying for generating function_graph. do not send png mime type to the browser if we are not sure whether the generated png file exists.