Sounds like you want a miter box (sometimes spelled "mitre box").
Having a bench hook on one side is nice too, so it's easy to hold onto.
Example:
Also, depending on what you're doing, you might also want to make a 45 degree "shooting board" -- a similar homemade tool that allows you to use a hand plane to get ultra-precise fits on your joints.
