Introduce a new utils_resolve_relative function

This function aims to resolve relative path such as './' and
'../' in the middle of a path string. This allows to use paths
such as '~/../test' that are received as '/home/x/../test' for
instance.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Tests: Add test_utils_resolve_relative to unit tests

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Correct the behavior of the utils_expand_path function

Even if the utils_expand_path function was intended to allow to
use unexistent directory paths, it was in fact only working for
some kind of arguments. Paths like "foo", "bar/" or "bar/foo"
when the "bar" directory does not exist wasn't working. This
patch introduce a new way to expand paths in this function that
also works properly for these kind of arguments.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Tests: Add test_utils_expand_path to unit tests

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>