make dot a function with support for linux and apt-get

Signed-off-by: Joshua Rubin <joshua@rubixconsulting.com>