For the directory layout/class structure I suggest reading this
http://www.javapractices.com/topic/TopicAction.do?Id=205
The link talks about Java but it applies to any Language (even non- OOP)
You might also find this interesting
http://www.gnu.org/prep/standards/html_node/index.html