Add types for remaining `in-foo` functions

Also fixed `in-directory` type

Please merge into 6.0