search: Match end of grep output

It's unlikely that the path contains a colon in but it makes the code
clearer (you've heard about self documenting regexes, right?)

Signed-off-by: Carl Helmertz <helmertz@gmail.com>
api/mvc: Open up as API, split functions by responsibility

Borrowing python's "if __name__ == '__main__'" style, to only execute
controller logic if we're being called directly.

Introducing an API with namespace + clear modelish function, so that you
could do:

require 'path/to/tad/index.php';
$paste_id = \tad\create("this is a paste");
echo \tad\read($paste_id);

Insight: namespaces should be able to have private functions
Insight 2: my first php project in X years without OOP. Cheers.

Signed-off-by: Carl Helmertz <helmertz@gmail.com>