How can I get OSX Mavericks to notice a DNS change in `/etc/hosts`?
According to the the hosts(5) manual page, the /etc/hosts file is used by mDNSResponder. Your attempts are correctly flushing the computer wide cache but you also need to flush the browser's private cache.

After each edit of /etc/hosts reset the mDNSResponder cache using this Apple technical note, OS X: How to reset the DNS cache:

sudo dscacheutil -flushcache


After doing this, reset your browser caches:


Safari: use the menu item Safari > Reset Safari.
Chrome: use the menu item Chrome > Clear Browsing Data.