The folder/file detection was broken by 9fea43e46a. This commit fixes and adds relevant specs
9fea43e46a
cd