rename fun variable to isFunction
improve documentation failure message
fix local documentation opening for OS X