path_to_theme() return "modules/system"
Whenever I'm stuck in a module, or a context that path_to_theme() doesn't return what I'd like - I use the following to access the current globally selected theme.

global $theme;
$path_to_theme = drupal_get_path('theme',$theme);


For instance if I am in a subtheme, or a slighly different flavour (mobile vs. desktop) of my theme, I use $theme that to get my active theme.