MCP23017 I/O Expander

Can you use platform mcp23017 to detect if light switch/button has been pushed (as sensor)?
How fast does HA trigger automation after pushing light switch?

So the folder must be called /modules with a slash at the beginning?
Can you confirm that?

yes
first time with this name it worked with no issue for me