Port resolve.php to http://github.com/airve/mixin