check up directory for category and name. fixes #185