tidy functions for shareboard

* filetype detection moves to single function
* load shareboard when either Preview or Compile is called
* both preview and compile use `command.sh` for pandoc conversion