made path to secrets an absolute path
fixed bugs with beautifulsoup introduced by new markdown
generalized "media_rebase" function
small code cleanup