functions: improve mkd

https://github.com/mathiasbynens/dotfiles/commit/b740cb4f6c7cec3780866d69cbf60542c7a7494d